package testcase;

import common.*;
import java.util.*;

public class JsonScanerTest
{
    public static void main(String[] args)
    {
	JsonScaner js = new JsonScaner();
	String testString = "{\"some\":{\"some2\":[  1, 2,3]}";
	// js.scan(testString);
	// for(String item: js)
	//     {
	// 	System.out.println(js.getState()+" - "+item);
	//     }
	
	System.out.println("----------");
	Filer fl = new Filer();
	js.scan(fl.getReader(args[0]));
	
	try
	    {
		for(String item: js)
		    {
			System.out.println(js.getState()+" - ("+item+")");
		    }
	    }
	catch(JsonScanerException jse)
	    {
		jse.printStackTrace();
	    }
    }
}
